package com.company.example.copy;

import java.io.Serializable;

/**
 * Created by ywl on 2017/2/23.
 */
public class User implements Cloneable,Serializable{
    private String name;
    private int age;

    public User(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public User() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Object clone(){
        User o =null;
        try {
            o = (User) super.clone();
        }catch(Exception e){
            e.printStackTrace();
        }
        return o;
    }
}
